package com.dong.service;

import com.dong.mapper.ReaderMapper;
import com.dong.pojo.Reader;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ReaderServiceImpl implements ReaderService{

    @Autowired
    ReaderMapper readerMapper;

    @Override
    public Reader selectReaderByUsername(String username) {
        return readerMapper.selectReaderByUsername(username);
    }

    @Override
    public List<Reader> selectAllReader() {
        return readerMapper.selectAllReader();
    }

    @Override
    public int insertReader(Reader reader) {
        return readerMapper.insertReader(reader);
    }

    @Override
    public int updateReaderState(int bookId, int state) {
        return readerMapper.updateReaderState(bookId,state);
    }

    @Override
    public int updateReader(Reader reader) {
        return readerMapper.updateReader(reader);
    }

    @Override
    public List<Reader> selectLike(String keyword) {
        return readerMapper.selectLike(keyword);
    }


}
